package com.zhanbo.zhanbowymusic;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.mwx.baselib.base.BaseActivity;
import com.zhanbo.zhanbowymusic.databinding.ActivityMvplayBinding;

public class MVPlayActivity extends BaseActivity<ActivityMvplayBinding> {

    @Override
    protected void init(Bundle savedInstanceState) {
        initData();
    }


    @Override
    protected Object getLayout() {
        return R.layout.activity_mvplay;
    }

    @Override
    protected void initData() {
        binding.jzVideo.setUp("https://media.w3.org/2010/05/sintel/trailer.mp4"
                , "饺子闭眼睛");
//        binding.jzVideo.posterImageView.setImage("http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640");
    }

    @Override
    protected void initListener() {

    }
//    @Override
//    public void onBackPressed() {
//        super.onBackPressed();
//        if (binding.jzVideo.backPress()) {
//            return;
//        }
//    }

    @Override
    public void onWindowFocusChanged(boolean hasFocus) {
        super.onWindowFocusChanged(hasFocus);
    }

    @Override
    protected void onPause() {
        super.onPause();
        binding.jzVideo.releaseAllVideos();
    }
}